SpatialStream® Code Examples

Layer Metadata

This example uses the BrowseLayers component to return layer metadata about a single layer. This is accomplished by passing in the layers parameter for a single layer ACCOUNT_FOLDER/ SCHOOLDISTRICTS. This approach can be used to retrieve information about a single layer such as its available attributes, extents, and relationships that are associated with the layer.

The primary benefit of using the BrowseLayers service, along with the layers parameter, is that it simplifies the request for layer information by isolating it to an individual layer and allowing the return of all metadata pertinent to that layer in a single call. An application developer might find this useful when building a Search form UI, when trying to obtain the extents of a layer to define layer styles, or when trying to understand the relationships that are associated with a layer for designing information display.

BrowseLayers

//Browse for the school district layer located in the ACCOUNT_FOLDER and dispaly the metadata for that layer.
var url = Dmp.Env.Connections["SS"].getBaseUrl() + "BrowseLayers.aspx?Folder=ACCOUNT_FOLDER&layersFilter=ACCOUNT_FOLDER/SCHOOLDISTRICT&output=json";
Dmp.Env.Connections["SS"].getJson(url, successCallback, errorCallback);


Run Sample   View Video   Back To Index